#pragma once
#include "api.h"
#include <list>
#include "dm_table.h"
#include "DataTableField.h"

namespace Dimine{ namespace Core{

	
	public ref class dmDataTableFieldCollectionCS{
	private:
		std::list<CFieldStru*>* m_fields;
	public:
		property dmDataTableFieldCS^ default[unsigned int]
		{
			dmDataTableFieldCS^ get(unsigned int index)
			{
				if(m_fields->size()>=index)
				{
					std::list<CFieldStru*>::const_iterator begin=m_fields->begin();
					while(index>0)
					{
						begin++;
						index--;
					}
					gcnew dmDataTableFieldCS(*begin);
				}
				return nullptr;
			}
		}
	};
	
}}
